
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh_Hans">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Django FAQ &#8212; Django 3.2.6.dev 文档</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <link rel="index" title="索引" href="../genindex.html" />
    <link rel="search" title="搜索" href="../search.html" />
    <link rel="next" title="FAQ：概述" href="general.html" />
    <link rel="prev" title="编写数据库迁移语句" href="../howto/writing-migrations.html" />



 
<script src="../templatebuiltins.js"></script>
<script>
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "../ref/templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);</script>

  </head><body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../index.html">Django 3.2.6.dev 文档</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../index.html">Home</a>  |
        <a title="Table of contents" href="../contents.html">Table of contents</a>  |
        <a title="Global index" href="../genindex.html">Index</a>  |
        <a title="Module index" href="../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="../howto/writing-migrations.html" title="编写数据库迁移语句">previous</a>
     |
    <a title="Django 3.2.6.dev 文档" href="../index.html" accesskey="U">up</a>
   |
    <a href="general.html" title="FAQ：概述">next</a> &raquo;</div>
    </div>

    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="faq-index">
            
  <div class="section" id="s-django-faq">
<span id="django-faq"></span><h1>Django FAQ<a class="headerlink" href="#django-faq" title="永久链接至标题">¶</a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="general.html">FAQ：概述</a><ul>
<li class="toctree-l2"><a class="reference internal" href="general.html#why-does-this-project-exist">这个项目因何存在。</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#what-does-django-mean-and-how-do-you-pronounce-it">“Django”是什么意思，怎么发音？</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#is-django-stable">Django 稳定吗?</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#does-django-scale">Django 可扩展吗?</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#who-s-behind-this">谁在这背后？</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#how-is-django-licensed">Django 是如何授权的？</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#why-does-django-include-python-s-license-file">为什么 Django 包含 Python 的协议文件？</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#which-sites-use-django">哪些站点使用 Django?</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names">Django 似乎是一个 MVC 框架，但是您将控制器称为“视图”，并视图称为“模板”。 为什么不使用标准命名？</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#framework-x-does-feature-y-why-doesn-t-django">&lt;Framework X&gt;可以做到&lt;feature Y&gt;--为什么 Django 不能呢？</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#why-did-you-write-all-of-django-from-scratch-instead-of-using-other-python-libraries">为什么你要从头开始写所有的 Django 项目，而不是使用其他 Python 库？</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#is-django-a-content-management-system-cms">Django 是个内容管理系统(CMS)吗?</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#how-can-i-download-the-django-documentation-to-read-it-offline">我如何下载 Django 文档进行离线阅读？</a></li>
<li class="toctree-l2"><a class="reference internal" href="general.html#how-do-i-cite-django">如何引用 Django？</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="install.html">FAQ：安装</a><ul>
<li class="toctree-l2"><a class="reference internal" href="install.html#how-do-i-get-started">如何开始？</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#what-are-django-s-prerequisites">使用 Django，需要做好什么准备？</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#what-python-version-can-i-use-with-django">我应该使用哪个版本的 Python 来配合 Django?</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#what-python-version-should-i-use-with-django">我应该选用什么版本的 Python 来使用 Django ？</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html#should-i-use-the-stable-version-or-development-version">我应该使用稳定版本还是开发版本？</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="usage.html">FAQ: 使用Django</a><ul>
<li class="toctree-l2"><a class="reference internal" href="usage.html#why-do-i-get-an-error-about-importing-django-settings-module">为什么我在导入 <code class="docutils literal notranslate"><span class="pre">DJANGO_SETTINGS_MODULE</span></code> 时收到错误提示？</a></li>
<li class="toctree-l2"><a class="reference internal" href="usage.html#i-can-t-stand-your-template-language-do-i-have-to-use-it">我不喜欢 Django 的模板语言，能不能不使用它？</a></li>
<li class="toctree-l2"><a class="reference internal" href="usage.html#do-i-have-to-use-your-model-database-layer">我是否必须使用你的模型/数据库层？</a></li>
<li class="toctree-l2"><a class="reference internal" href="usage.html#how-do-i-use-image-and-file-fields">我要怎么使用图片和文件字段？</a></li>
<li class="toctree-l2"><a class="reference internal" href="usage.html#how-do-i-make-a-variable-available-to-all-my-templates">我如何让一个变量可用于我的所有模板之中？</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="help.html">FAQ：获取帮助</a><ul>
<li class="toctree-l2"><a class="reference internal" href="help.html#how-do-i-do-x-why-doesn-t-y-work-where-can-i-go-to-get-help">我该如何做 X？Y为什么不工作？我可以去哪里寻求帮助？</a></li>
<li class="toctree-l2"><a class="reference internal" href="help.html#why-hasn-t-my-message-appeared-on-django-users">为什么我的信息没有出现在 <em>django-users</em> 上面呢？</a></li>
<li class="toctree-l2"><a class="reference internal" href="help.html#nobody-answered-my-question-what-should-i-do">没有人回答我的问题！我应该怎么办呢？</a></li>
<li class="toctree-l2"><a class="reference internal" href="help.html#i-think-i-ve-found-a-bug-what-should-i-do">我认为我找到了个 bug！我应该做什么呢？</a></li>
<li class="toctree-l2"><a class="reference internal" href="help.html#i-think-i-ve-found-a-security-problem-what-should-i-do">我认为我已经发现了个安全问题！我应该做什么？</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="models.html">FAQ：数据库和模型</a><ul>
<li class="toctree-l2"><a class="reference internal" href="models.html#how-can-i-see-the-raw-sql-queries-django-is-running">我该如何在Django运行的过程中看到SQL查询？</a></li>
<li class="toctree-l2"><a class="reference internal" href="models.html#can-i-use-django-with-a-pre-existing-database">我可以让 Django 用一个之前已经存在的数据库吗？</a></li>
<li class="toctree-l2"><a class="reference internal" href="models.html#if-i-make-changes-to-a-model-how-do-i-update-the-database">如果我对一个模型做了改动，我该如何去更新数据库？</a></li>
<li class="toctree-l2"><a class="reference internal" href="models.html#do-django-models-support-multiple-column-primary-keys">Django 支持多列主键吗？</a></li>
<li class="toctree-l2"><a class="reference internal" href="models.html#does-django-support-nosql-databases">Django 支持 NoSQL 数据库吗？</a></li>
<li class="toctree-l2"><a class="reference internal" href="models.html#how-do-i-add-database-specific-options-to-my-create-table-statements-such-as-specifying-myisam-as-the-table-type">如何将特定于数据库的选项添加到我的 CREATE TABLE 语句中，例如将 MylSAM 指定为表类型？</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="admin.html">FAQ：管理</a><ul>
<li class="toctree-l2"><a class="reference internal" href="admin.html#i-can-t-log-in-when-i-enter-a-valid-username-and-password-it-just-brings-up-the-login-page-again-with-no-error-messages">无法登录。当我输入有效的用户名和密码后，页面再跳转到登录页面，没有显示任何错误信息。</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin.html#i-can-t-log-in-when-i-enter-a-valid-username-and-password-it-brings-up-the-login-page-again-with-a-please-enter-a-correct-username-and-password-error">我无法登陆。当我输入有效的用户名和密码后，它又跳转到了登录界面，并且显示一个“请输入正确的用户名和密码”的错误。</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin.html#how-do-i-automatically-set-a-field-s-value-to-the-user-who-last-edited-the-object-in-the-admin">在管理面板中，如何将字段的值自动设置为最后编辑它的用户？</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin.html#how-do-i-limit-admin-access-so-that-objects-can-only-be-edited-by-the-users-who-created-them">我们如何设定管理权限，以便对象只能由创建它们的用户进行编辑？</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin.html#my-admin-site-css-and-images-showed-up-fine-using-the-development-server-but-they-re-not-displaying-when-using-mod-wsgi">管理界面的 CSS 和图片在开发模式下正常加载，但是在使用 mod_wsgi 进行部署的情况下却无法进行加载？</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin.html#my-list-filter-contains-a-manytomanyfield-but-the-filter-doesn-t-display">我的“list_filter”包含一个 ManyToManyField (多对多字段)，但过滤器不显示</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin.html#some-objects-aren-t-appearing-in-the-admin">有些对象没有在管理中出现。</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin.html#how-can-i-customize-the-functionality-of-the-admin-interface">如何个性化管理员后台接口的功能？</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin.html#the-dynamically-generated-admin-site-is-ugly-how-can-i-change-it">动态生成的管理页面太丑了。我该怎么换掉它？</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin.html#what-browsers-are-supported-for-using-the-admin">Admin 适配了哪些浏览器？</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="contributing.html">FAQ：贡献代码</a><ul>
<li class="toctree-l2"><a class="reference internal" href="contributing.html#how-can-i-get-started-contributing-code-to-django">如何为 Django 贡献代码?</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing.html#i-submitted-a-bug-fix-in-the-ticket-system-several-weeks-ago-why-are-you-ignoring-my-patch">我几周之前提交了一个工单系统 bug 的修复。为什么忽略我的提议？</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing.html#when-and-how-might-i-remind-the-team-of-a-patch-i-care-about">何时以及如何提醒团队我所关注的补丁？</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing.html#but-i-ve-reminded-you-several-times-and-you-keep-ignoring-my-patch">但是我已经提醒你好几遍了，你依然继续忽略我的补丁！</a></li>
<li class="toctree-l2"><a class="reference internal" href="contributing.html#i-m-sure-my-ticket-is-absolutely-100-perfect-can-i-mark-it-as-ready-for-checkin-myself">I'm sure my ticket is absolutely 100% perfect, can I mark it as &quot;Ready For Checkin&quot; myself?</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">错误调试</a><ul>
<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html#problems-running-django-admin">运行 <code class="docutils literal notranslate"><span class="pre">django-admin</span></code> 时遇到的问题</a></li>
<li class="toctree-l2"><a class="reference internal" href="troubleshooting.html#miscellaneous">杂项</a></li>
</ul>
</li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>上一个主题</h4>
  <p class="topless"><a href="../howto/writing-migrations.html"
                        title="上一章">编写数据库迁移语句</a></p>
  <h4>下一个主题</h4>
  <p class="topless"><a href="general.html"
                        title="下一章">FAQ：概述</a></p>
  <div role="note" aria-label="source link">
    <h3>本页</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/faq/index.txt"
            rel="nofollow">显示源代码</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>快速搜索</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="转向" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">7月 23, 2021</p>
          </div>
        
      
    </div>

    <div id="ft">
      <div class="nav">
    &laquo; <a href="../howto/writing-migrations.html" title="编写数据库迁移语句">previous</a>
     |
    <a title="Django 3.2.6.dev 文档" href="../index.html" accesskey="U">up</a>
   |
    <a href="general.html" title="FAQ：概述">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>